<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ElementId</title>
</head>
<body>
    <img id="img" src="../img/lufei.jpg">
    <h1 id="name">这是路飞!</h1>
</body>
</html>
<script>
    let elementById = document.getElementById("img");
    let elementById1 = document.getElementById("name");
    alert("进行换图片和名字的操作！");
    elementById.src="../img/suolong.jpg";
    alert("管文字")
    elementById1.innerHTML="这是索隆！";
</script>